3757da
@@ -40,6 +40,8 @@
import org.apache.hadoop.mapreduce.InputSplit;
 import org.apache.hadoop.mapreduce.TaskAttemptContext;
 import org.apache.hadoop.util.StringUtils;
 
+import com.google.common.annotations.VisibleForTesting;
+
 /**
  * Iterate over an HBase table data, return (ImmutableBytesWritable, Result)
  * pairs.
@@ -53,8 +55,8 @@
public class TableRecordReaderImpl {
   private static final Log LOG = LogFactory.getLog(TableRecordReaderImpl.class);
 
   // HBASE_COUNTER_GROUP_NAME is the name of mapreduce counter group for HBase
-  private static final String HBASE_COUNTER_GROUP_NAME =
-    "HBase Counters";
+  @VisibleForTesting
+  static final String HBASE_COUNTER_GROUP_NAME = "HBase Counters";
   private ResultScanner scanner = null;
   private Scan scan = null;
   private Scan currentScan = null;
@@ -269,7 +271,7 @@
public class TableRecordReaderImpl {
    * @throws IOException
    */
   private void updateCounters() throws IOException {
-    ScanMetrics scanMetrics = this.scan.getScanMetrics();
+    ScanMetrics scanMetrics = currentScan.getScanMetrics();
     if (scanMetrics == null) {
       return;
     }
